package com.ajmd.onlineexam.enumeration;

/**
 * @author ajmd
 * @since 2023/3/8 14:15
 */
public enum CodeMsgEnum {
    SERVICE_EXCEPTION(500,"服务器异常"),
    SUCCESS(200,"成功"),
    UNKNOWN_REASON(10000, "未知错误"),
    BAD_SQL_GRAMMAR(10001, "sql语法错误"),
    JSON_PARSE_ERROR(10002, "json解析异常");


    private final Integer code;
    private final String message;

    CodeMsgEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "ResultCodeEnum{" + "code=" + code + ", message='" + message + '\'' + '}';
    }


}
